package com.xul.srb.core.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xul.srb.core.pojo.entity.Borrower;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xul.srb.core.pojo.vo.BorrowerApprovalVO;
import com.xul.srb.core.pojo.vo.BorrowerDetailVO;
import com.xul.srb.core.pojo.vo.BorrowerVO;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 借款人 服务类
 * </p>
 *
 * @author xul
 * @since 2021-11-06
 */
public interface BorrowerService extends IService<Borrower> {

    /**
     * 保存借款人信息
     *
     * @param borrowerVO
     * @param request
     */
    void saveByBorrowerVO(BorrowerVO borrowerVO, HttpServletRequest request);

    /**
     * 获取借款人认证状态
     *
     * @param request
     * @return
     */
    Integer getBorrowerStatus(HttpServletRequest request);

    /**
     * 获取借款人分页列表
     *
     * @param page
     * @param limit
     * @param keyword
     * @return
     */
    IPage<Borrower> listPage(Long page, Long limit, String keyword);

    /**
     * 获取借款人信息
     *
     * @param id
     * @return
     */
    BorrowerDetailVO getBorrowerDetailVOById(Long id);

    /**
     * 借款额度审批
     *
     * @param borrowerApprovalVO
     */
    void approval(BorrowerApprovalVO borrowerApprovalVO);
}
